package org.abac4j.scanner;

import java.io.IOException;
import java.net.URL;
import java.util.Map;
import java.util.Set;

import org.scannotation.AnnotationDB;
import org.scannotation.ClasspathUrlFinder;

public class AnnotationScanner {
	
	public Map<String, Set<String>> scanAnnotations() {
		URL[] urls = ClasspathUrlFinder.findClassPaths(); 
		AnnotationDB db = new AnnotationDB(); 
		try {
			db.scanArchives(urls);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return db.getAnnotationIndex();
	}

}
